package com.sanuo.pico.event;

import com.menu.app.event.BaseEvent;

public class WarnEvent extends BaseEvent<Integer[]> {

    public WarnEvent() {
        value = new Integer[5];
    }

    @Override
    protected Integer[] getDefault() {
        return new Integer[5];
    }

    public void postValue(int i, int v) {
        value[i] = v;
        post();
    }

    public boolean hasWarn() {
        for (Integer i : value) {
            if (i != null && i == 1) {
                return true;
            }
        }
        return false;
    }
}
